Skip to main content

All Questions

0votes
2answers
763views

Why does ftruncate with a shared memory object not use memory?

I've observed that I can create a shared memory object and give it ostensibly any size with ftruncate, regardless of the resource limits on my system. The code below sets the size to 262 TB, and ...
bgfvdu3w's user avatar
1vote
1answer
136views

What shared memory is not controlled by SHMAX/SHMALL?

We are debugging a situation where the cached/shared memory increase and increase until the system reach OOM-killer. We have set shmax and shmall in sysctl.conf but without any visible effect. Do we ...
GuzZzt's user avatar
0votes
0answers
454views

How pass a queue of data from kernel to user space?

I'm currently writing a module for Linux, and I want to pass a queue of data from kernel to user space (my program in userland being responsible for read this data - and then responsible for writing ...
LINux's user avatar
0votes
0answers
189views

shmat returns error (void *) -1 in selinux enabled rhel environment

as per the documentaion:- If SHM_RDONLY is specified in shmflg, the segment is attached for reading and the process must have read permission for the segment. Otherwise the segment is attached for ...
Aryaman Gupta's user avatar
17votes
1answer
3kviews

Is it wrong to think of "memfd"s as accounted "to the process that owns the file"?

https://dvdhrm.wordpress.com/2014/06/10/memfd_create2/ Theoretically, you could achieve [memfd_create()] behavior without introducing new syscalls, like this: int fd = open("/tmp", O_RDWR | ...
sourcejedi's user avatar
2votes
0answers
2kviews

Extremely high shmem usage

I'm trying to debug the issue that's periodically taking down my work machine. It's an OOM-type problem, and based on this /proc/meminfo output: Total: 32902608 kB MemFree: 4054100 kB ...
user508633's user avatar
7votes
1answer
2kviews

File backed, locked shared memory and disk interaction

Varnish, a HTTP accelerator, uses a ~80MB file backed SHM log that is mlock()ed into memory. The Varnish docs recommend to store the file on tmpfs to avoid unnecessary disk access. However if the ...
user195311's user avatar

close